<template>
  <div class="error-page">
    <div class="error-code">
      4<span>0</span>4
    </div>
    <div class="error-desc">
      啊哦~ 你所访问的页面不存在
    </div>
    <div class="error-handle">
      <el-button
        type="primary"
        size="large"
        @click="goBack"
      >
        返回上一页
      </el-button>
      <el-button
        size="large"
        @click="goHome"
      >
        返回首页
      </el-button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Page404',
  methods: {
    goBack () {
      this.$router.go(-1)
    },
    goHome () {
      this.$router.push('/')
    }
  }
}
</script>

<style lang="scss" scoped>
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #f3f3f3;
  text-align: center;

  .error-code {
    line-height: 1;
    font-size: 250px;
    font-weight: bold;
    color: #2d8cf0;

    span {
      color: #00a854;
    }
  }

  .error-desc {
    font-size: 30px;
    color: #777;
    margin-bottom: 30px;
  }

  .error-handle {
    .el-button {
      margin: 0 10px;
      width: 120px;
    }
  }
}

@media screen and (max-width: 768px) {
  .error-page {
    .error-code {
      font-size: 180px;
    }

    .error-desc {
      font-size: 24px;
    }
  }
}
</style>
